import { errorMapper } from './utils/errorMapper';
import { cleanDeadCreeps } from './utils/memoryCleaner';
import { RoleManager } from './managers/role.manager';
import { SpawnManager } from './managers/spawn.manager';
import { CreepManager } from './managers/creep.manager';

module.exports.loop = errorMapper(() => {
    // 清理内存 //
    cleanDeadCreeps();

    RoleManager.initialize();
    SpawnManager.run();
    CreepManager.run();
});